<div class="main" style="clear:both">
<!-- Container-->

<?php 
    $this->load->view('layouts/sidebar');
if(!empty($categories)){
    $this->load->view('layouts/news_categories2');
}
if(!empty($posts)){
if(count($posts)>1 && !$post_id){

    $this->load->view('layouts/news_categories');
}else
    $this->load->view('layouts/news_article');
}
unset($posts);
?>
    </div>
<div class="clear"></div>
<!--End Contaier--> 